package com.yuan.java强制类型转换;

/*
 *  @author 雨安
 *  类名： CastTypeConversion
 *  创建时间：2024/4/29  强制类型转换
 */
public class CastTypeConversion {
    public static void maina(String[] args) {
        int num1 = 10;

        double numm2 = num1;

        System.out.println(numm2);

    }

    public static void mainb(String[] args) {
        double num1 = 10.5;

        int num2 = (int) num1;

        System.out.println(num2);

    }

    public static void main(String[] args) {
        Object obj = "Hello";

        String str = (String) obj;

        System.out.println(str);
    }
}
